﻿// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

Shader "Custom/OverdrawShader"
{
	Properties
	{
		_OverDrawColor("Color", Color) = (0,0,0,0)
	}

		SubShader{
			Tags{ "RenderType" = "Transparent" "Queue" = "Transparent" }
			LOD 100
			Fog{ Mode Off }
			ZWrite Off
			ZTest Always
			Blend One One
			BlendOp Add

			Pass{
				CGPROGRAM
	#pragma vertex vert
	#pragma fragment frag
	#include "UnityCG.cginc"

			fixed4 _OverDrawColor;

			struct vIn {
				half4 vertex:POSITION;
			};

			struct vOut {
				half4 pos:SV_POSITION;
			};

			vOut vert(vIn v) {
				vOut o;
				UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
				o.pos = UnityObjectToClipPos(v.vertex);
				return o;
			}

			fixed4 frag(vOut i) :COLOR{
				return _OverDrawColor;
			}
			ENDCG
		}
	}
}
